home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #6 / Amiga Plus CD - 2004 - No. 06.iso / AmiSoft / Hard / drivr / ArakAttack.lha / ArakAttack / ArakAttack.install next >
Text File  |  2004-05-03  |  28KB  |  774 lines

  1. ; $VER: ArakAttack USB Driver Install V1.12 (08.01.2004).
  2. ; Install script for ArakAttack (Workbench 2.0 or higher)
  3.  
  4. (delopts "force" "askuser" "nofail")
  5. (USER 2)
  6.  
  7. ;#########################################################################
  8.  
  9. (set #home @execute-dir)
  10. (set #InstallDataDir "InstallData")
  11. (set #DevsDir (EXPANDPATH "Devs:USBHardware"))
  12. (set #PrefsDir (EXPANDPATH "sys:prefs"))
  13. (set #CatalogsDir (EXPANDPATH "Locale:Catalogs"))
  14. (set #HelpDir (EXPANDPATH "Help:"))
  15. (set #CDir (EXPANDPATH "c:"))
  16.  
  17. (SET #InstallerVersion 44)
  18. (SET #InstallerRevision 10)
  19.  
  20. (SET #DoHIDClass 1)            ; Don't install HIDClassPatch
  21.  
  22. (set #Amithlon 0)            ; No Amithlon
  23. (set #Morphos 0)            ; No MorphOS
  24.  
  25. (set #Dummy (/ (getversion "amithlon.device" (Resident)) 65536))
  26. (if (>= #Dummy 1) (set #Amithlon 2))
  27.  
  28. ;--- Destination path on MorphOS is different, so we adapt in such case!
  29.  
  30. (if (exists "MOSSYS:Devs/USBHardware" (NoReq))
  31. (
  32.  (set #DevsDir "MOSSYS:Devs/USBHardware")
  33.  (set #Morphos 1)
  34. ))
  35.  
  36.  
  37. ;#########################################################################
  38. ; Error cleanup code.
  39. ;#########################################################################
  40.  
  41. (onerror
  42.     (
  43.         (if (> @ioerr 0)
  44.             (message (cat #ioerror "\n\n ERROR CODE: " @ioerr))
  45.         )
  46.     )
  47. )
  48.  
  49.  
  50. (effect "lower_right" "radial" $5098c0 $5098c0)
  51. (showmedia "ArakUSBLogo" "ArakUSB.ilbm" "upper_left" "none" 0)
  52.  
  53. ;#########################################################################
  54. ; Is the install data drawer compressed?
  55. ;#########################################################################
  56.  
  57. (set #cleanupinst 0)
  58.  
  59. (if (exists "InstallData.lha")
  60.     (
  61.         (if (exists "C:Lha")
  62.             (
  63.                 (run "Lha -q x InstallData.lha T:" (safe))
  64.             ) (
  65.                 (run "LhEX -qfw=T: x InstallData.lha" (safe))
  66.             )
  67.         )
  68.         (set #InstallDataDir "T:InstallData")
  69.         (set #cleanupinst 1)
  70.     )
  71. )
  72. ;#########################################################################
  73. ; Is there a keyfile on disk?
  74. ;#########################################################################
  75.  
  76.  
  77. (if (<> 0
  78.  
  79.         (OR 
  80.            (exists "keyfile:AmithlonUSB.key" (QUIET))
  81.            (exists "keyfiles:AmithlonUSB.key" (QUIET))
  82.            (exists "devs:AmithlonUSB.key" (QUIET))
  83.            (exists "s:AmithlonUSB.key" (QUIET))
  84.            (exists "c:AmithlonUSB.key" (QUIET))
  85.            (exists "l:AmithlonUSB.key" (QUIET))
  86.            (exists "libs:AmithlonUSB.key" (QUIET))
  87.            (exists "sys:AmithlonUSB.key" (QUIET))
  88.            (exists "env:AmithlonUSB.key" (QUIET))
  89.            (exists "envarc:AmithlonUSB.key" (QUIET))
  90.            (exists "rexx:AmithlonUSB.key" (QUIET))
  91.            (exists "fonts:AmithlonUSB.key" (QUIET))
  92.            (exists "locale:AmithlonUSB.key" (QUIET))
  93.  
  94.            (exists "keyfile:OpenUSB.key" (QUIET))
  95.            (exists "keyfiles:OpenUSB.key" (QUIET))
  96.            (exists "devs:OpenUSB.key" (QUIET))
  97.            (exists "s:OpenUSB.key" (QUIET))
  98.            (exists "c:OpenUSB.key" (QUIET))
  99.            (exists "l:OpenUSB.key" (QUIET))
  100.            (exists "libs:OpenUSB.key" (QUIET))
  101.            (exists "sys:OpenUSB.key" (QUIET))
  102.            (exists "env:OpenUSB.key" (QUIET))
  103.            (exists "envarc:OpenUSB.key" (QUIET))
  104.            (exists "rexx:OpenUSB.key" (QUIET))
  105.            (exists "fonts:OpenUSB.key" (QUIET))
  106.            (exists "locale:OpenUSB.key" (QUIET))
  107.         )
  108.     )
  109. (
  110. (SET #DefBinary 1)
  111. ))
  112.  
  113. ;#########################################################################
  114. ; Language english
  115. ;#########################################################################
  116.  
  117. (if (= @language "english")
  118.     (
  119.         (set #DefLanguage 1)
  120.         (set #ioerror "\n\nAn error occured during the installation!\n\n")
  121.  
  122.  
  123.         (set #bad-kick "You must have at least Workbench 2.0+")
  124.  
  125.         (set #bad-installer
  126.             (CAT "You have an old version of the program 'Installer' installed!"
  127.                   "\n\nThe installation procedure needs at least Installer %ld.%ld.\n\n"
  128.                   "Please check your configuration!\n"
  129.             )
  130.         )
  131.  
  132.         (set #App-MainMode "Please choose installer mode:")
  133.         (set #App-Install "Install")
  134.         (set #App-DeInstall "Deinstall")
  135.  
  136.         (set #App-DeinstallMsg
  137.             (cat "\n\n"
  138.                 "ArakAttack will be deinstalled!\n\n"
  139.                 "All ArakAttack releated files will be removed from harddisk.\n\n"
  140.                 "Please note that the Poseidon installation is not effected by deinstalling ArakAttack!"
  141.             )
  142.         )
  143.  
  144.         (set #Deinstall-Done "\nArakAttack has been removed successfully.")
  145.  
  146.         (set #App-InstallMsg
  147.             (cat "\n\n"
  148.                 ("Welcome to the installation program for the\nArakAttack USB driver V%d.%d\n\n"
  149.                 (getversion (tackon #InstallDataDir "1")))
  150.                 "by Guido Mersmann <geit@gmx.de>\n\n"
  151.                 "Please read the documentation (HELP:) for further information!"
  152.             )
  153.         )
  154.  
  155.         (set #App-Full "Full Version (requires keyfile)")
  156.         (set #App-Demo "Demo Version")
  157.  
  158.         (set #App-Keyfile "Which version do you want to install?")
  159.  
  160.         (set #App-Keyfile-help
  161.             (cat "\n"
  162.                  "The full version requires an AmithlonUSB or OpenUSB keyfile!\n\n"
  163.                  "Please make sure the keyfile is installed within one of these drawers:"
  164.                  " 's:', 'l:', 'c:', 'devs:', 'keyfile:', 'keyfiles:'\n\n"
  165.                  "The demo version is time limited and much slower compared to the"
  166.                  " full version!\n"
  167.             )
  168.         )
  169.  
  170.         (set #App-Language "Which languages should be installed?")
  171.         (set #App-Language-help
  172.              (cat "\nThe Amiga can be operated in many different"
  173.                   " languages."
  174.                   "To reduce the amount of space consumed by the"
  175.                   " language files, you can select to have only the"
  176.                   " files of specific languages copied.\n\n"
  177.                   "Simply check the boxes of the languages you wish"
  178.                   " to have available on your system.\n\n"
  179.              )
  180.         )
  181.  
  182.         (SET #App-PoseidonInst
  183.             (cat "\nA Poseidon installation was found!\n\n\n"
  184.                  "Do you want to set-up a new configuration?\n\n"
  185.                  "Please note that all you prior configuration get's"
  186.                  " lost if you select 'Set-Up'"
  187.             )
  188.         )
  189.  
  190.         (SET #App-NoPos "Don't Set-Up")
  191.         (SET #App-DoPos "Set-Up")
  192.  
  193.         (SET #App-PosSetup
  194.             (cat "\nPoseidon will now automaticaly search for any USB controller hardware.\n\n" 
  195.                  " This may take some time. To speed up the auto detection redurce the"
  196.                  " amount of connected USB devices.\n\n"
  197.                  "If you're using an USB mouse and/or keyboard right now, then you'll"
  198.                  " notice these devices aren't responding during setup. This is no system crash"
  199.                  " or freeze! Just wait for the installation to be finished!\n\n"
  200.             )
  201.         )
  202.  
  203.         (SET #App-PoseidonInput
  204.             (cat "\n'PSDLoadModule' line found within the file 's:startup-sequence'!\n\n\n"
  205.                  "This command is installing an input.device replacement provided by Poseidon"
  206.                  " which is causing trouble when used on Amithlon.\n\n"
  207.                  "Please remove this line by hand and install the included HIDClassPatch.\n\n"
  208.                  "For further information consult the ArakAttack and Poseidon documentation!"
  209.             )
  210.         )
  211.  
  212.         (SET #App-InputPatch
  213.             (cat "\nThis packet provides a little patch for the HIDClass of Poseidon.\n\n"
  214.                  "This patch allows to use an USB keyboard without restrictions and without"
  215.                  " replacing the whole 'input.device'.\n\n"
  216.                  "Without the new input device and this patch a connected keyboard is not 100% compatible."
  217.                  " You also must not install this patch together with the updated input.device included in the"
  218.                  " Poseidon archive. Normaly the small patch is doing the job and replacing the input device is"
  219.                  " wasting only memory.\n\n"
  220.                  "For further information consult the ArakAttack and Poseidon documentation!"
  221.             )
  222.         )
  223.  
  224.         (SET #App-DoHID "Install")
  225.         (SET #App-NoHID "Skip This")
  226.  
  227.  
  228.         (SET #Startup-prompt    "\n\nSome lines need to be added to S:User-Startup:\n\n%s")
  229.         (SET #StartupRemove-prompt "\nRemove %s lines within your user-startup?")
  230.  
  231.         (set #Install-Done
  232.             (cat "\nArakAttack has been installed!\n\n"
  233.                  "If there are any questions consult the included manual (HELP:) and especialy the FAQ section first.\n\n"
  234.                  "There also exist two internet groups for talking about USB:\n\n"
  235.                  "'highway_usb@yahoogroups.com' is the best place, because here you'll find all usb related developers and users.\n\n"
  236.                  "'amithlonusb@yahoogroups.com' is open for any amithlon usb user, but here only amithlon specific problems can be solved."
  237.             )
  238.         )
  239.  
  240.  
  241.  
  242.     )
  243. )
  244.  
  245. ;#########################################################################
  246. ; Language german
  247. ;#########################################################################
  248.  
  249. (if (= @language "deutsch")
  250.     (
  251.         (set #DefLanguage 2)
  252.         (set #ioerror "\n\nWährend der Installation ist folgender Fehler aufgetreten!\n\n")
  253.  
  254.         (set #bad-installer
  255.             (CAT "Achtung! Es ist eine alte Version des Programmes 'Installer' installiert"
  256.                  "\n\nDie Installation benötigt mindestens Installer %ld.%ld.\n\n"
  257.                  "Bitte überprüfen Sie Ihre Konfiguration!\n"
  258.             )
  259.         )
  260.  
  261.         (set #App-InstallMsg
  262.             (cat "\n\n"
  263.                 ("Willkommen zur Installation vom\nArakAttack USB Treiber V%d.%d\n\n"
  264.                 (getversion (tackon #InstallDataDir "1")))
  265.                 "von Guido Mersmann <geit@gmx.de>\n\n"
  266.                 "Bitte lesen Sie die Anleitung (HELP:) für weitere Informationen!"
  267.             )
  268.         )
  269.  
  270.         (set #App-MainMode "Bitte wählen Sie den Installationsmodus:")
  271.         (set #App-Install "Installieren")
  272.         (set #App-DeInstall "Deinstallieren")
  273.  
  274.         (set #App-DeinstallMsg
  275.             (cat "\n\n"
  276.                 "ArakAttack wird jetzt entfernt!\n\n"
  277.                 "Alle Dateien die zu ArakAttack gehören werden von der Festplatte gelöscht.\n\n"
  278.                 "Achtung: Die Poseidoninstallation bleibt vollständig bestehen! Das Deinstallieren"
  279.                 " von ArakAttack hat keinen Einfluss auf Poseidon!"
  280.             )
  281.         )
  282.  
  283.         (set #Deinstall-Done "\nArakAttack wurde erfolgreich entfernt.")
  284.  
  285.         (set #App-Full "Vollversion (Benötigt Keyfile)")
  286.         (set #App-Demo "Demoversion")
  287.  
  288.         (set #App-Keyfile "Welche Version wollen Sie installieren?")
  289.  
  290.         (set #App-Keyfile-help
  291.             (cat "\n"
  292.                  "Die Vollversion benötigt ein AmithlonUSB or OpenUSB keyfile!\n\n"
  293.                  "Bitte stellen Sie sicher, dass das Keyfile in einem der"
  294.                  " folgenden Verzeichnisse installiert ist, bevor sie fortfahren:"
  295.                  " 's:', 'l:', 'c:', 'devs:', 'keyfile:' oder 'keyfiles:'\n\n"
  296.                  "Die Demoversion ist zeitlich beschränkt und deutlich langsammer"
  297.                  " als die Vollversion\n"
  298.             )
  299.         )
  300.  
  301.         (SET #App-Language "Welche Sprachen sollen installiert werden ?")
  302.  
  303.         (set #App-Language-help
  304.             (cat "\nDer Amiga kann in vielen verschiedenen Sprachen"
  305.                  " arbeiten. Um Plattenkapazität zu sparen können Sie"
  306.                  " nur die Sprachen anwählen, die sie benötigen"
  307.                  " Haken Sie also einfach die Sprachen ab, die Sie"
  308.                  " Ihrem System zugänglich machen wollen."
  309.             )
  310.         )
  311.        
  312.         (SET #App-PoseidonInst
  313.             (cat "\nEs wurde eine Poseidoninstallation gefunden!\n\n\n"
  314.                  "Wollen Sie eine neue Konfiguration erstellen?\n\n"
  315.                  "Beachten Sie, dass dann ihre bisherigen Poseidoneinstellungen verloren gehen,"
  316.                  " wenn Sie sich für eine Neuerstellung entscheiden."
  317.             )
  318.         )
  319.  
  320.         (SET #App-NoPos "Nicht Erstellen")
  321.         (SET #App-DoPos "Erstellen")
  322.  
  323.  
  324.         (SET #App-PosSetup
  325.             (cat "\nPoseidon wird jetzt automatisch nach den vorhandenen USB Kontrollern suchen.\n\n" 
  326.                  " Dieser Vorgang kann einige Zeit dauern. Um den Vorgang zu beschleunigen können"
  327.                  " Sie jetzt alle unbenutzten Geräte abziehen.\n\n"
  328.                  "Wenn Sie eine USB Maus und/oder Tastatur verwenden, dann werden Sie feststellen,"
  329.                  " dass diese Geräte zeitweilig nicht reagieren. Das ist kein Absturz oder Einfrieren des Systems!"
  330.                  " Warten Sie einfach ab, bis die Installation abgeschlossen ist.\n\n"
  331.             )
  332.         )
  333.  
  334.         (SET #App-PoseidonInput
  335.             (cat "\n'PSDLoadModule' Kommando in der Datei 's:startup-sequence' gefunden!\n\n\n"
  336.                  "Dieses Kommando aus dem Poseidionpaket installiert einen input.device Ersatz"
  337.                  " der unter Amithlon Probleme macht.\n\n"
  338.                  "Bitte entfernen Sie die Zeile von Hand und installieren Sie den HIDClassPatch im nächsten Abschnitt.\n\n"
  339.                  "Weitere Informationen finden sie in der ArakAttack- und in der Poseidonanleitung!"
  340.             )
  341.         )
  342.  
  343.         (SET #App-InputPatch
  344.             (cat "\nDieses Paket enthält einen kleinen Patch für die HIDClass von Poseidon.\n\n"
  345.                  "Dieser Patch erlaubt es eine USB Tastatur ohne Einschränkungen und vor allen Dingen ohne"
  346.                  " Ersetzen des kompletten 'input.device' zu benutzen.\n\n"
  347.                  "Ohne das neue 'input.device' aus dem Poseidonarchiv oder diesen Patch ist die Tastatur nicht 100% kompatibel."
  348.                  " Sie sollten auf keinen Fall beides zusammen installieren."
  349.                  " Der kleine Patch sollte alle Inkompatiblitäten beseitigen und ein Ersetzen des"
  350.                  " original Devices ist nicht nötig.\n\n"
  351.                  "Weitere Informationen finden sie in der ArakAttack- und in der Poseidonanleitung!"
  352.             )
  353.         )
  354.  
  355.         (SET #App-DoHID "Installieren")
  356.         (SET #App-NoHID "Überspringen")
  357.  
  358.         (SET #Startup-prompt    "\n\nJetzt werden folgende Eintragungen in die S:User-Startup gemacht:\n\n%s")
  359.         (SET #StartupRemove-prompt "\n\nDie zu %s gehörenden Einträge in der User-startup werden gelöscht!")
  360.  
  361.  
  362.         (set #Install-Done
  363.             (cat "\nArakAttack wurde erfolgreich installiert!\n\n"
  364.                  "Wenn Sie Fragen haben, dann schauen Sie bitte zuerst in die Anleitung (HELP:) und"
  365.                  " speziell in das Kapitel 'Fragen und Antworten'!\n\n"
  366.                  "Es existieren auch zwei Internetgruppen zum Thema Amiga und USB:\n\n"
  367.                  "'highway_usb@yahoogroups.com' ist der beste Platz, weil hier"
  368.                  " alle USB Autoren und Benutzer aufeinandertreffen.\n\n"
  369.                  "'amithlonusb@yahoogroups.com' ist offen für Amithlonnutzer. Hier können"
  370.                  " aber nur Amithlon spezifische Fragen beantwortet werden!"
  371.             )
  372.         )
  373.  
  374.  
  375.     )
  376. )
  377. ;#########################################################################
  378. ; Check for the latest installer version
  379. ;#########################################################################
  380.  
  381. (IF (< (/ (getversion) 65536) 37)
  382. (
  383.   (abort #bad-kick)
  384. )
  385. )
  386. ; Check installer Version 
  387. (if (< @installer-version (+ (* #InstallerVersion 65536) #InstallerRevision))
  388. (
  389.   (abort (#bad-installer #InstallerVersion #InstallerRevision))
  390. )
  391. ) ;if
  392.  
  393.  
  394. ;#########################################################################
  395.  
  396.  
  397. (message #App-InstallMsg)
  398.  
  399.  
  400. ;-------------------------------------------------------------------------
  401. ; Ask for installing or deinstalling
  402. ;-------------------------------------------------------------------------
  403. (trace)
  404.  
  405. (set #InstallerMode
  406.      (ASKCHOICE
  407.                         (PROMPT #App-MainMode)
  408.                         (HELP @askchoice-help)
  409.                         (CHOICES
  410.                                 (#App-Install #ApplicationName)
  411.                                 (#App-Deinstall #ApplicationName)
  412.                         )
  413.                         (back (retrace))                
  414.                         (default #InstallerMode)
  415.      )
  416. )
  417.  
  418. ;#########################################################################
  419. (IF (= #InstallerMode "0")(
  420.  
  421. ;-------------------------------------------------------------------------
  422. ; Ask for installing the Full or Demo Version
  423. ;-------------------------------------------------------------------------
  424. (trace)
  425.  
  426. (set #Binary
  427.             (ASKCHOICE
  428.                 (prompt #App-Keyfile)
  429.                 (HELP #App-Keyfile-help)
  430.                 (default #DefBinary)
  431.                 (choices #App-Demo #App-Full)
  432.                 (back (retrace))
  433.             )
  434. )
  435.  
  436. (SET #DefBinary #Binary)
  437.  
  438. ;--------------------------------------------------------------------------------------------------------------------
  439. ; Ask catalog and documentation language
  440. ;--------------------------------------------------------------------------------------------------------------------
  441. (trace)
  442.  
  443. (SET #Language  (ASKOPTIONS
  444.                 (PROMPT #App-Language)
  445.                 (HELP #App-Language-help)
  446.                  (CHOICES
  447.                          "English"
  448.                          "Deutsch"
  449.                  )
  450.                 (DEFAULT #DefLanguage)
  451.                 (back (retrace))
  452.                 )
  453. )
  454.  
  455. (SET #DefLanguage #Language)
  456.  
  457. ;--------------------------------------------------------------------------------------------------------------------
  458. ; Ask for making a poseidon configuration
  459. ;--------------------------------------------------------------------------------------------------------------------
  460. (trace)
  461.  
  462. (if (exists "libs:poseidon.library"))
  463. (
  464.   (if (exists "c:AddUSBHardware"))
  465.   (
  466.     (if (exists "c:AddUSBClasses"))
  467.     (
  468.       (if (exists (tackon #PrefsDir "Trident")))
  469.       (
  470.             (set #DoPoseidonConfig
  471.                 (askbool
  472.                   (prompt #App-PoseidonInst)
  473.                   (help @askbool-help)
  474.                   (default 1)
  475.                   (choices #App-NoPos #App-DoPos)
  476.                   (back (retrace))                
  477.                 )
  478.             )
  479.       )
  480.     )
  481.   )
  482. )
  483.  
  484. ;--------------------------------------------------------------------------------------------------------------------
  485. ; Ask for installing the HIDClassPatch
  486. ;--------------------------------------------------------------------------------------------------------------------
  487. (trace)
  488.  
  489.  (IF #Amithlon
  490.  (
  491.  
  492.     (if (= 0 (run "Search S:Startup-Sequence PATTERN PSDLoadModule QUIET QUICK" (safe)))
  493.     (
  494.         (Message #App-PoseidonInput (back (retrace)))
  495.     ))
  496.  
  497.  
  498.         (SET #DoHIDClass
  499.                 (askbool
  500.                   (prompt #App-InputPatch)
  501.                   (help @askbool-help)
  502.                   (default #DoHIDClass)
  503.                   (choices #App-NoHID #App-DoHID)
  504.                   (back (retrace))                
  505.                 )
  506.         )
  507.  
  508.  ))
  509.  
  510.  
  511. (set #Binary (+ #Amithlon #Binary))
  512.  
  513. ;--------------------------------------------------------------------------------------------------------------------
  514. ; Remove obsolete stuff!
  515. ;--------------------------------------------------------------------------------------------------------------------
  516.  
  517. (delete (Tackon #CatalogsDir "deutsch/OpenUSB.catalog") (optional FORCE) (INFOS))
  518. (delete (Tackon #CatalogsDir "deutsch/AmithlonUSB.catalog") (optional FORCE) (INFOS))
  519. (delete (Tackon #HelpDir "english/OpenUSB.guide") (optional FORCE) (INFOS))
  520. (delete (Tackon #HelpDir "deutsch/OpenUSB.guide") (optional FORCE) (INFOS))
  521. (delete (Tackon #HelpDir "english/AmithlonUSB.guide") (optional FORCE) (INFOS))
  522. (delete (Tackon #HelpDir "deutsch/AmithlonUSB.guide") (optional FORCE) (INFOS))
  523.  
  524.  
  525. ;--------------------------------------------------------------------------------------------------------------------
  526. ; Remove old Stuff
  527. ;--------------------------------------------------------------------------------------------------------------------
  528.  
  529. (delete (Tackon #CatalogsDir "deutsch/ArakAttack.catalog") (optional FORCE) (INFOS))
  530. (delete (Tackon #HelpDir "english/ArakAttack.guide") (optional FORCE) (INFOS))
  531. (delete (Tackon #HelpDir "deutsch/ArakAttack.guide") (optional FORCE) (INFOS))
  532.  
  533. ;--------------------------------------------------------------------------------------------------------------------
  534. ; Copy the files.
  535. ;--------------------------------------------------------------------------------------------------------------------
  536.  
  537. (makedir "Devs:USBHardware")        ; just in case the directory does not exist.
  538.  
  539. (complete 0)
  540.  
  541. (complete 10)
  542.  
  543.  
  544.                   (COPYFILES
  545.         (SOURCE (CAT #InstallDataDir "/" (SELECT #Binary "2d" "2" "1d" "1")))
  546.         (DEST   #DevsDir )
  547.         (newname (SELECT #Binary "OpenUSB.device" "OpenUSB.device" "AmithlonUSB.device" "AmithlonUSB.device"))
  548.         (HELP @copyfiles-help)
  549.         (OPTIONAL <force>)
  550.         (ALL)
  551.                   )
  552.  
  553. (complete 20)
  554.  
  555.                   (COPYFILES
  556.         (SOURCE (CAT #InstallDataDir "/10"))
  557.         (DEST   #PrefsDir )
  558.         (newname (SELECT #Binary "OpenUSB" "OpenUSB" "AmithlonUSB" "AmithlonUSB"))
  559.         (HELP @copyfiles-help)
  560.         (OPTIONAL <force>)
  561.         (ALL)
  562.     (if (not (exists (Tackon #PrefsDir (SELECT #Binary "OpenUSB.info" "OpenUSB.info" "AmithlonUSB.info" "AmithlonUSB.info")) )) (infos))
  563.     (noposition)
  564.                   )
  565. ;--------------------------------------------------------------------------------------------------------------------
  566. ; Now we kill all files we did not copy! Just in case there is OpenUSB Stuff on disk during AmithlonUSB installation
  567. ;--------------------------------------------------------------------------------------------------------------------
  568.  
  569. (complete 30)
  570.  
  571. (delete (Tackon #DevsDir (SELECT #Binary "AmithlonUSB.device" "AmithlonUSB.device" "OpenUSB.device" "OpenUSB.device")) (optional FORCE) (Infos))
  572.  
  573. (complete 40)
  574.  
  575. (delete (Tackon #PrefsDir (SELECT #Binary "AmithlonUSB" "AmithlonUSB" "OpenUSB" "OpenUSB")) (optional FORCE) (infos))
  576.  
  577. ;--------------------------------------------------------------------------------------------------------------------
  578. ; copy catalogs and documentation by language
  579. ;--------------------------------------------------------------------------------------------------------------------
  580.  
  581.  
  582. (set n 0)
  583. (while (< n 2)
  584.         (SET #Dummy (SELECT n "english" "deutsch"))
  585.         (
  586.               (IF (IN #Language n)
  587.                 (
  588.  
  589.         (MAKEDIR (TACKON #CatalogsDir #Dummy))
  590.                         (COPYFILES
  591.                                 (SOURCE (cat #InstallDataDir "/catalogs/" #Dummy))
  592.                                 (DEST (TACKON #CatalogsDir #Dummy))
  593.                                 (HELP @copyfiles-help)
  594.                                 (ALL)
  595.                         )
  596.  
  597.         (MAKEDIR (TACKON #HelpDir #Dummy))
  598.                         (COPYFILES
  599.                                 (SOURCE (cat #InstallDataDir "/help/" #Dummy))
  600.                                 (DEST (TACKON #HelpDir #Dummy))
  601.                                 (HELP @copyfiles-help)
  602.                                 (ALL)
  603.                         )
  604.                 )
  605.  
  606.               )
  607.         )
  608. (SET n (+ n 1))
  609. )
  610.  
  611. ;--------------------------------------------------------------------------------------------------------------------
  612. ; Run setup to finalize installation
  613. ;--------------------------------------------------------------------------------------------------------------------
  614. (complete 50)
  615.  
  616.     (run (tackon #InstallDataDir "10 NOGUI"))
  617.  
  618.  
  619. ;--------------------------------------------------------------------------------------------------------------------
  620. ; Setup Poseidon installation
  621. ;--------------------------------------------------------------------------------------------------------------------
  622. (complete 60)
  623.  
  624.   (if (= "0" #DoPoseidonConfig)
  625.   (    
  626.  
  627.       (Message #App-PosSetup)
  628.  
  629.       (complete 65)
  630.  
  631.       (run "c:AddUSBHardware REMOVE ALL")
  632.  
  633.       (complete 66)
  634.      
  635.       (run (tackon #PrefsDir "Trident NOGUI SAVE"))
  636.  
  637.       (complete 70)
  638.  
  639.       (Delete "ENV:PSDStackLoader" "ENVARC:PSDStackloader")
  640.  
  641.                 (run "Echo >T:AddUSBHW \"FailAt 21\"")
  642.  
  643.                 (run
  644.                     (cat
  645.                         "List >>T:AddUSBHW FILES " (TACKON #DevsDir "(AmithlonUSB|OpenUSB).device")
  646.                         " LFORMAT \"c:AddUSBHardware %p%n unit 0 ALL\""
  647.                     )
  648.                 )
  649.  
  650.       (complete 75)
  651.                 (run "c:execute T:AddUSBHW")
  652.                 (delete "T:AddUSBHW")
  653.       (complete 78)
  654.  
  655.                 (run "c:AddUSBClasses")
  656.       (complete 80)
  657.                 (run (tackon #PrefsDir "Trident NOGUI SAVE"))
  658.       (complete 90)
  659.  
  660.   ))
  661.  
  662. ;--------------------------------------------------------------------------------------------------------------------
  663. ; Setup HIDClassPatch
  664. ;--------------------------------------------------------------------------------------------------------------------
  665.  
  666.         (if (= "0" #DoHIDClass)
  667.         (    
  668.  
  669.             (SET #dummy (TACKON #CDir "HIDClassPatch"))
  670.  
  671.  
  672.             (COPYFILES
  673.                  (SOURCE (cat #InstallDataDir "/c/HIDClassPatch"))
  674.                  (DEST #CDir)
  675.                  (HELP @copyfiles-help)
  676.                  (ALL)
  677.             )
  678.  
  679.             (SET #dummy (CAT "run <>NIL: " #dummy " <>NIL:"))
  680.  
  681.             (STARTUP @app-name
  682.  
  683.               (HELP @startup-help)
  684.               (PROMPT (#startup-prompt #dummy))
  685.               (COMMAND #dummy)
  686.             )
  687.         ))
  688.  
  689. ;-------------------------------------------------------------------------------------------------------------------
  690.  
  691. (complete 100)
  692.  
  693. (if #cleanupinst
  694.     (
  695.         (run
  696.              (cat "Delete " #InstallDataDir " ALL QUIET FORCE")
  697.         )
  698.     )
  699. )
  700.  
  701. ;#########################################################################
  702. ; Installation successful!
  703. ;#########################################################################
  704.  
  705. (Message #Install-Done)
  706. (exit (quiet))
  707.  
  708. )) ;IF #InstallerMode = 0
  709. ;#########################################################################
  710.  
  711. ;********************** Deinstallation *****************************************************
  712.  
  713. (IF (= #InstallerMode "1")(
  714.  
  715. (Message #App-DeinstallMsg)
  716.  
  717. (complete 10)
  718.  
  719. (delete (Tackon #DevsDir "AmithlonUSB.device") (optional FORCE) (INFOS))
  720.  
  721. (complete 15)
  722.  
  723. (delete (Tackon #DevsDir "OpenUSB.device") (optional FORCE) (INFOS))
  724.  
  725. (complete 30)
  726.  
  727. (delete (Tackon #PrefsDir "AmithlonUSB") (optional FORCE) (INFOS))
  728.  
  729. (complete 45)
  730.  
  731. (delete (Tackon #PrefsDir "OpenUSB") (optional FORCE) (INFOS))
  732.  
  733. (complete 60)
  734.  
  735. (delete (Tackon #CatalogsDir "deutsch/ArakAttack.catalog") (optional FORCE) (INFOS))
  736.  
  737. (complete 65)
  738.  
  739. (delete (Tackon #HelpDir "english/ArakAttack.guide") (optional FORCE) (INFOS))
  740. (delete (Tackon #HelpDir "deutsch/ArakAttack.guide") (optional FORCE) (INFOS))
  741.  
  742. (complete 75)
  743.  
  744. (delete (Tackon #CDir "HIDClassPatch") (optional FORCE) (INFOS))
  745.  
  746. (complete 80)
  747.  
  748. (STARTUP @app-name
  749.       (HELP @startup-help)
  750.       (PROMPT (#startupRemove-prompt @app-name))
  751. )
  752.  
  753. (complete 90)
  754.  
  755. (if #cleanupinst
  756.     (
  757.         (run
  758.              (cat "Delete " #InstallDataDir " ALL QUIET FORCE")
  759.         )
  760.     )
  761. )
  762.  
  763.  
  764. (complete 100)
  765.  
  766. (Message #Deinstall-Done)
  767.  
  768. (exit (QUIET))
  769. (welcome)
  770.  
  771. ;-----------------------------------------------
  772. )) ;IF #InstallerMode = 1
  773. ;-----------------------------------------------
  774.